package loop;

import java.util.Scanner;

public class LoopWhileFor_5 {
    public static void main(String[] args) {
//        int number = 1234;
//        System.out.println( number % 10 );
//        System.out.println( number / 10 % 10 );
//        System.out.println( number / 100 % 10 );
//        System.out.println( number / 1000 % 10 );
        int number ;
        System.out.println( "请输入您要转换的整数" );
        Scanner scanner = new Scanner( System.in ) ;
        number = scanner.nextInt() ;
        number = Math.abs(number) ;
        int n = (int)Math.log10(number) ;
        /*int i = 0 ;
        int j = 1 ;

        while ( i <= n){
            System.out.print( number / j % 10 );
            j *= 10 ;
            i++ ;
        }
        */
//        for ( i = 0 ; i <= n ; i++){
//            System.out.print( number / j % 10);
//            j *= 10 ;
//        }
        int i = n ;
        int j = (int)Math.pow(10,n) ;
        while (i >= 0){
            System.out.print( number / j % 10 + "," );
            j /= 10 ;
            i-- ;
        }


    }
}
